﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GarmentKingProto
{
    public partial class frmPurchase : Form
    {
        private string type;

        public frmPurchase(string x)
        {
            type = x;
            InitializeComponent();
        }
        
        private void button1_Click(object sender, EventArgs e)
        {

           // Page.form.controle.add();
           
            
            label6.Visible = true;
            lbl_qty.Visible = true;
            label8.Visible = true;
            label9.Visible = true;
            label10.Visible = true;
            label11.Visible = true;
            //label8 l8 = new label8();
            //this.controles.add(l8);
            //lebel1.text="ggjhj
            //thiu=l1
            label9.Text = textBox3.Text;
            label10.Text = textBox4.Text;
            label11.Text = textBox5.Text;
        }

       
        
        private void Form4_Load(object sender, EventArgs e)
        {
            if (type == "DC")
            {
                lbl_lot.Visible = false;
                textBox2.Visible = false;
                lbl_roll.Text = "Shot ID";
                textBox2.Text = "NILL";
            }

            Check();
          
        }

        private void label10_Click(object sender, EventArgs e)
        {

        }

        // Enables or disables SUBMIT Button
        private void Check()
        {
            if (Validation.valueCheck(this))
                button2.Enabled = true;
            else
                button2.Enabled = false;
        }

        private void comboBox1_Leave(object sender, EventArgs e)
        {
            Check();
        }

    }
}
